package com.sitech.portal.system.service.impl;

import java.util.HashMap;
import java.util.List;

import com.sitech.portal.system.dao.ISysUserPanelOrderDao;
import com.sitech.portal.system.service.ISysUserPanelOrderService;

public class SysUserPanelOrderServiceImpl implements ISysUserPanelOrderService {

	private ISysUserPanelOrderDao sysUserPanelOrderDao;
	
	
	
	public ISysUserPanelOrderDao getSysUserPanelOrderDao() {
		return sysUserPanelOrderDao;
	}



	public void setSysUserPanelOrderDao(ISysUserPanelOrderDao sysUserPanelOrderDao) {
		this.sysUserPanelOrderDao = sysUserPanelOrderDao;
	}


	public List<HashMap> findPanelOrder(String userId){
		return sysUserPanelOrderDao.findPanelOrder(userId);
	}

	@Override
	public void updatePanelOrder(String userId, List<HashMap> list) {
		// TODO Auto-generated method stub
		sysUserPanelOrderDao.deletePanelOrder(userId);
		
		for(int i=0;i<list.size();i++){
			sysUserPanelOrderDao.insertPanelOrder(list.get(i));
		}
	}

}
